package com.sleep.ruledemo.fegin.fallback;

import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.openfeign.FallbackFactory;

/**
 * @ClassName ExceptionFallbackFactory
 * @Description TODO
 * @Author 郭敖
 * @Date 2025年01月06日 14:29
 * @Version 1.0
 */
@Slf4j
public class ExceptionFallbackFactory implements FallbackFactory {

    @Override
    public Object create(Throwable cause) {
        log.error("接口调用异常: {}", cause.getMessage());
        return null;
    }
}
